home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Very Best of Atari Inside
/
The Very Best of Atari Inside 1.iso
/
mint
/
mntlb20
/
lib
/
_fltsisf.s
< prev
next >
Wrap
Text File
|
1992-05-17
|
546b
|
34 lines
|
| long integer to single float conversion routine
|
| Andreas Schwab (schwab@ls5.informatik.uni-dortmund.de)
| mostly copied from _floatsi.cpp
BIAS4 = 0x7F-1
.text
.even
.globl ___floatsisf
___floatsisf:
moveml d2-d5,sp@- | save registers to make norm_sf happy
movel sp@(20),d4 | prepare result mantissa
movew #BIAS4+32-8,d0 | radix point after 32 bits
movel d4,d2 | set sign flag
swap d2
tstw d2 | check sign of number
bge 1f | nonnegative
negl d4 | take absolute value
1:
clrw d1 | set rounding = 0
jmp norm_sf